/*	TGScreenSaverView.m
 *	Part of ThinkGeek LED Clock
 *	http://cs.beloit.edu/~morgant/thinkgeek/
 *
 * Copyright (c)2003-2005 Tim Morgan. All rights reserved.
 * Please visit http://cs.beloit.edu/~morgant/other/license.html
 * for more information about your rights and responsibilities
 * regarding this source code.
 */

#import "TGScreenSaverView.h"

#import "TGDefaultsLoader.h"

@implementation TGScreenSaverView

#pragma mark <<initialization/deallocation>>

- (id) initWithFrame:(NSRect)frame {
	return [self initWithFrame:frame isPreview:NO];
}

- (id) initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview {
	if (self = [super initWithFrame:frame isPreview:isPreview]) {
		[self setAnimationTimeInterval:0.5]; // update every half-second
		[TGConfigureSheetController configureTransformers];
		[NSBundle loadNibNamed:@"ConfigureSheet.nib" owner:self];
		[[TGDefaultsLoader loader] loadDefaults];
	}
	return self;
}

#pragma mark -
#pragma mark <<graphics>>

- (void) animateOneFrame {
    return;
}

#pragma mark -
#pragma mark <<configuration>>

+ (BOOL) performGammaFade {
	if ([[[TGDefaultsModel defaultsModel] backgroundStyle] isEqualToString:[TGStringConstants backgroundStyleDesktop]])
		return NO;
	else return YES;
}

- (BOOL) hasConfigureSheet {
	return YES;
}

- (NSWindow *) configureSheet {
	return [[TGConfigureSheetController controller] configureSheet];
}

@end
